package com.ccbooks.listener;



import com.ccbooks.view.BookCatalogView;
import com.ccbooks.view.BookContentView;



import android.app.Activity;
import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;


public class BtnBookStoreClick implements OnClickListener{

	
	private Activity context;
	
	

	public BtnBookStoreClick(Activity context) {
		super();
		this.context = context;
	}



	// 返回
	

		@Override
		public void onClick(View v) {
			// TODO Auto-generated method stub
			if (context instanceof BookContentView){
				context.finish();
			}else if (context instanceof BookCatalogView){
				context.setResult(-1);
				context.finish();
			}
		}

	
	
	
}
